from django.db import models

# Create your models here.
# Instrument model includes name, description, serial number and belongs to a company, verbose name for all fields are defined

class Instrument(models.Model):
    name = models.CharField(max_length=100, verbose_name='Instrument Name')
    description = models.TextField(verbose_name='Description')
    serial_number = models.CharField(max_length=100, verbose_name='Serial Number')
    company = models.ForeignKey('company.Company', on_delete=models.CASCADE, verbose_name='Company' )

    def __str__(self):
        return self.name

    class Meta:
        verbose_name = 'Instrument'
        verbose_name_plural = 'Instruments'

    